Analyzing an acquired arrangement of object locations

ABSTRACT

An acquired arrangement of object locations is analyzed. The acquired arrangement imperfectly conforms to an ideal arrangement of points. Sets of vectors are found in the acquired arrangement. A composite set of vectors is derived from the sets of vectors.

BACKGROUND OF THE INVENTION

The invention relates to analyzing an acquired arrangement of objectlocations.

The usefulness of a product expected to include items or attributes in apredetermined arrangement is diminished by a defect relating to thearrangement. If the product is meant to be a component in anotherproduct, this defect may ruin the other product.

For this reason, products incorporating such items or attributes in suchpredetermined arrangements may be inspected for compliance with somestandard. Examples of products appropriate for inspection include ballgrid array devices, micro-ball grid arrays, flip chips, and chip-scalepackages (together called "BGAs"). The contacts (i.e., electricalterminals) of a BGA are metallic balls that are mounted on one side ofthe device for forming electrical connections between an integratedcircuit within the BGA and a printed circuit board.

The standard used in the inspection is typically created by manual entryof coordinates, by "golden template" sampling, by derivation fromcomputer-aided design ("CAD") data, or by some combination of these.According to the manual entry technique, a human operator uses a dataentry device, such as a mouse or a keyboard, to specify x-y coordinatesfor the position of each object in the arrangement. Thus, manual entrycan require considerable time. In golden template sampling, thepositions of the objects in the standard are taken to be the positionsfound in an actual implementation of an ideal arrangement (e.g., anarrangement of balls of an actual BGA device). Golden template samplingmay take less time than manual entry but may provide results that areless accurate. With respect to derivation from CAD data, the positionsof the objects may be determined by software that automatically selectsthe positions in accordance with information about design goals, if suchinformation is available.

SUMMARY OF THE INVENTION

In general, in one aspect, the invention features a method for analyzingan acquired arrangement of object locations that imperfectly conforms toan ideal arrangement of points. The method includes finding sets ofvectors in the acquired arrangement of object locations, and deriving acomposite set of vectors from the sets of vectors.

Implementations of the invention may include one or more of thefollowing features. At least one of the object locations may representan electrical terminal. The method may further include deriving anapproximation of the ideal arrangement of points from the acquiredarrangement of object locations, wherein the approximation includes anindication of whether an intersection specified by the composite set ofvectors corresponds to an object location. The method may furtherinclude determining vectors between an object location and a number ofthe object location's nearest neighboring points, or determining whetheran object location matches, to an acceptable tolerance, a positionspecified by the composite set of vectors. The method may furtherinclude adjusting at least one of the vectors in the composite set totake into account a difference between the position specified and theactual position of the matching object location. The method may furtherinclude, based on the composite set of vectors and the actual positionof the matching object location, specifying a location in which tosearch for another matching object location. The method may furtherinclude determining whether a non-matching object location matches, toan acceptable tolerance, another position specified by another compositeset of the vectors.

In general, in another aspect, the invention features a system fordetecting a pattern of discrete objects represented in an image. Thesystem includes a location producer deriving an arrangement of objectlocations from the image, each object location representing anelectrical terminal; a vectors producer deriving a set of vectorsrepresented in the arrangement; a grid element producer deriving atwo-vector grid element from the set of vectors; and a grid producer andgrid element refiner testing the two-vector grid element against thearrangement of object locations and refining the two-vector grid elementto take into account the actual positions of the object locations.

Among the advantages of the invention are one or more of the following.An effective approximation of an ideal regular pattern can be derivedfrom a single golden template sample. Thus, in a case where directinformation about the ideal pattern is unavailable (e.g., because CADdata is non-existent or inaccessible), the sample can be used asindirect information about the ideal pattern. In addition, the effectiveapproximation can provide a standard that is sufficient for use in aquality control inspection system, which renders unnecessary the expenseof time and resources involved in creating the standard by directinformation. At least a portion of the standard can be stored inabbreviated form (e.g., a grid element to be repeated, and an on-offtable), which can significantly reduce data storage requirements,especially in cases of large arrangements.

Other advantages and features will become apparent from the followingdescription and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an arrangement analyzer.

FIG. 2 is an illustration of an approximation produced by thearrangement analyzer.

FIGS. 3 and 6 are flow diagrams of procedures.

FIG. 4 is a block diagram of an image processing system.

FIG. 5 is a block diagram of an implementation of the image processingsystem.

FIGS. 7-10 are illustrations of digital image data.

FIGS. 11A-11C are diagrams of histograms derived from the digital imagedata of FIGS. 7-10.

FIG. 12 is a diagram of background/foreground digital data derived fromthe digital image data of FIGS. 7-10.

FIG. 13 is a diagram of an arrangement of points derived from thebackground/foreground digital data of FIG. 12.

FIG. 14 is a diagram helpful for understanding the diagram of FIG. 13.

FIG. 15 is a diagram of vectors derived from the arrangement of FIG. 13.

FIG. 15A is a diagram of a grid element derived from the vectors of FIG.15.

FIG. 16 is a diagram helpful for understanding the diagram of FIG. 15.

FIG. 17 is a histogram derived from the vectors of FIG. 15.

FIGS. 18-19, 21, 24-25 are diagrams of grids derived from thearrangement of FIG. 13.

FIGS. 20, 23 are diagrams of refined grid elements derived from thearrangement of FIG. 13.

FIGS. 22, 26 are on-off tables derived from the arrangement of FIG. 13.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows arrangement analyzer 10 that derives an approximation 14 ofan ideal grid element (e.g., two ideal vectors disposed at an angle)from an actual, imperfect grid arrangement 12, such as an arrangement ofelectrical terminals, e.g., solder balls on a ball grid array device. Asdescribed below, the approximation 14 is derived by exploiting the factthat the actual arrangement 12 includes multiple imperfectimplementations of the ideal grid element, which implementations can beaveraged or otherwise combined to create the approximation 14.

With reference also to FIGS. 2-3, the arrangement analyzer 10 operatesas follows where the ideal grid element is an ideal two-vector gridelement (e.g., element 22) defined by two ideal vectors α_(i) and β_(i)disposed at an ideal angle θ_(i). The analyzer 10 receives the actualarrangement 12 of points (e.g., arrangement 16) representing animperfect version of an ideal grid (e.g., grid 20) that is based on theideal two-vector grid element (step 1010). Vector relationships (e.g.,vectors α₁₋₆ and β₁₋₆ disposed at angles including angles θ₁₋₄) aredetermined among the points in the actual arrangement 12 (step 1020).Using the vector relationships as imperfect versions of the idealvectors disposed at the ideal angle, approximation vectors α_(a) andβ_(a) and approximation angle θ_(a) of the approximation grid element 14(e.g., element 18) are determined (step 1030).

FIG. 4 illustrates image processing system 24 that is described in moredetail below in connection with a procedure 64. The image processingsystem 24 uses the arrangement analyzer 10 to detect regular patternsrepresented in the digital image. The arrangement analyzer 10 receivesan arrangement of points 26 (including actual arrangement 12) andproduces an approximation set 28 that includes the approximation gridelement 14 (as refined by the analyzer 10) and an on-off table.

In the image processing system 24, the arrangement of points 26 used bythe arrangement analyzer 10 is produced as follows. In accordance with athreshold 38 derived from a digital image 36 by a threshold determiner40, a threshold applier 34 derives from the digital image 36 abackground/foreground digital image 32 that exposes an arrangement ofsimilarly-sized discrete objects. From the background/foreground digitalimage 32, a points producer 30 derives the arrangement of points 26which corresponds to the arrangement of discrete objects.

In the arrangement analyzer 10, from the arrangement of points 26 avectors producer 42 derives a set of vectors 44 represented in thearrangement, from which set a grid element producer 46 creates a gridelement 48 that is tested against the arrangement of points 26 by a gridproducer and element refiner 50.

FIG. 5 shows implementation 52 of the image processing system 24, whichimplementation 52 includes a camera 54 for acquiring the digital imageof a sample 56 (e.g., a ball grid array device) bearing the actual gridarrangement, a processor 58, a data memory 60, and a program memory 62.Software instructions are stored in the program memory 62 to cause theprocessor 58 to serve as the threshold determiner 40, threshold applier34, points producer 30, vectors producer 42, grid element producer 46,and grid producer and element refiner 50.

FIG. 6 shows procedure 64 (described below with reference to an exampleillustrated by FIGS. 7-26) executed by the processor 58 in accordancewith the software instructions, to produce the refined grid element andon-off table 28 from the digital image 36, as shown in FIG. 4.

The digital image 36 (e.g., image 66 of FIG. 7 including a portion 68shown in FIG. 8) includes image elements having respective values (e.g.,elements 70, 72, 74 having respective values 6, 5, 2) each of whichrepresents a characteristic such as a brightness level or a color. It isexpected that the digital image 36 includes discrete objects (e.g., BGAballs) of similar size. As now described, to expose these discreteobjects in the digital image 36, the threshold determiner 40 chooses avalue for threshold 38 that emphasizes similar-sized sets of connectedimage elements, and the threshold applier 34 applies the threshold 38 tothe digital image 36 to produce the background/foreground digital image32 in which the similar-sized sets of image elements are in theforeground and the other image elements are in the background.

In the digital image 36, for each threshold value in a set of possiblethreshold values (e.g., 5, 6, 7), the threshold determiner 40 determinesthe area of each set of connected (i.e., contiguous) image elements thathave values equal to or greater than the threshold value (step 2010).For each threshold value, the sets are grouped by area (step 2020). Forexample, in the case of portion 68 (FIG. 8) which includes imageelements having values 2, 5, 6, 7, and 8, if a threshold value of 7 isused, it is determined that portion 68 has two sets having an area of 2,and one set having an area of 12, as shown in an area histogram in FIG.11A. The sets determined for threshold values 6 and 5 for portion 68 areshown in FIGS. 9 and 10, respectively, and in area histograms in FIGS.11B and 11C, respectively.

The threshold determiner 40 determines the threshold value (i.e., 5 inthe case of portion 68) for which the digital image 36 has the highestnumber of sets of similar area (step 2030).

The threshold applier 34 applies the threshold value to the digitalimage 36 to produce the background/foreground digital image 32 (e.g.,image 70 of FIG. 12), which includes discrete objects (e.g., objects72A-72N) in the foreground (step 2040). For each image element in thedigital image 36, the background/foreground digital image 32 has acorresponding image element that has one of two values: a valueassociated with the background or a value associated with the foreground(e.g., 0 or 9, respectively).

The points producer 30 produces arrangement of points 26 (e.g.,arrangement 74 of FIG. 13) in which each point represents a location ofa corresponding discrete object of the background/foreground digitalimage (e.g., points A-N shown in FIG. 13 and listed in FIG. 14 thatcorrespond to discrete objects 72A-72N, respectively) (step 2050). Eachpoint is selected by determining an image element that represents acentroid of the corresponding discrete object. Alternatively, each pointmay be selected by determining the center of the smallest rectangle orcircle that encloses the corresponding discrete object. The arrangementmay exclude points corresponding to any discrete objects that fail tomeet size or shape requirements.

The vectors producer 42 produces set of vectors 44 (e.g., a master tableof vectors) by determining vectors from each point to a number (e.g.,four) of the point's nearest neighboring points (step 2060). Forexample, the vectors shown in FIGS. 15 and 17 and listed in FIGS. 14 and16 are produced for arrangement 74 of FIG. 13. For point A, the nearestfour points are points B, J, K, and M, corresponding to vectors AB, AJ,AK, and AM, respectively.

For the purposes of the grid element producer 46, vectors that fallwithin angle and length tolerances of each other are consideredinstances of the same vector. For each possible pair of vectors in theset 44, the grid element producer 46 produces a grid element (step2070). For each grid element (step 2080), a best-matching point isdetermined in the arrangement of points 26 (step 2090). Thebest-matching point is the point having the highest number of associatedneighboring points that match positions defined by the grid element. Forexample, in the case of a grid element 79 (FIG. 15A) having vectorscomponents based on vectors AB and CD ("vector pair AB/CD") of FIG. 15,the best-matching point in arrangement 74 is point E as shown in FIG.18. This is so because when a different grid is started at each pointusing grid element 79 (e.g., for point E, a starting grid shown by linesegments 81A and 81B that are twice the lengths of vectors AB and CD,respectively, and that cross at point E), point E is found to have thehighest number of associated neighboring points (namely, three: pointsD, M, and F) that match positions defined by grid element 79. Withrespect to the other points, the corresponding number is only two foreach of points B-D and F-H, and only one or zero for each of theremaining points.

For each grid element, the grid producer and element refiner 50 uses thebest-matching point as an origin for producing a corresponding grid(step 2100). As shown in FIG. 19 for the grid element based on vectorpair AB/CD, the corresponding grid is produced by finding neighboringpoints that match positions defined by the grid element. A neighboringpoint so matches if the actual location of the neighboring point iswithin a distance tolerance (e.g., half the expected width of eachdiscrete object) of the defined location.

As matching neighboring points are found, the grid element is refined totake into account differences between defined (i.e., expected) locationsand the actual locations of the points found. The refinement may bebased on any statistical combination of the differences, e.g., a linearcombination such as an effective average of the differences, or anon-linear combination such as an effective root-mean-square combinationof the differences.

For example, in the case of the initial grid element based on vectorpair AB/CD using point E as an origin, an (x,y) location of (164,145) isdefined for a neighboring point. In this case, since point F matches thedefined location but has an actual (x,y) location of (165,144) (i.e.,slightly below and to the right of the defined location), the gridelement is altered so that the CD-based vector component of the gridelement is shifted accordingly, i.e., to point slightly below and to theright of its original bearing. The difference between the defined andactual locations for point F may be represented as (164-165,145-144) or(-1,1).

As the corresponding grid is produced, the refined grid element is thenused at each matching neighboring point found to find additionalmatching points, and is further refined as the additional matchingpoints are found. How the refined grid element is further altered eachtime a difference is found depends on the nature of the combination usedin the refinement, and perhaps (e.g., where an effective average servesas the combination) also on how many matching neighboring points werefound previously in the refinement process. In general where theeffective average is used, for an nth matching point associated with avector component and a difference of (A,B), the orientation of thevector component is altered by the difference divided by (n+1), i.e.,(A/(n+1),B/(n+1)). For instance, if a (5,5) difference is determined fora fourth matching point associated with a vector component, theorientation of the component is altered by (1,1), i.e., a fifth of the(5,5) difference. Thus, in the case of point F described above, if pointF is the first matching point associated with the CD-based vectorcomponent (i.e., n=1 and n+1=2), the orientation of the CD-based vectorcomponent is altered by a difference of (-1/2,1/2), i.e., (-0.5,0.5).Dividing the difference by (n+1) allows each matching point to affectthe vector component equally.

The refinement process may make use of a pseudo-inverse transform thatrepresents the grid element and is altered as each matching point isfound. Each matching point may or may not affect the grid element orvector component equally. In some applications, it may be advantageousto avoid accepting as matching an outlying matching point, i.e., a pointthat technically lines up with the grid element but is not animmediately neighboring point of any matching point already found. Forexample, if a point were located where indicated by reference numeral 85in FIG. 19, the point would be an outlying matching point because itwould line up with the grid as shown but would not be an immediatelyneighboring point of any matching point.

If a minimum number of matching points are not found as thecorresponding grid is produced, the refined grid element and grid arerejected (step 2110).

From the set of refined grid elements so developed, the grid producerand element refiner 50 retains the refined grid element andcorresponding grid (e.g., for arrangement 74, element 78 and grid 80shown in FIGS. 20 and 21, respectively) having the highest number ofassociated matching points (step 2120). This first refined grid elementand corresponding grid are retained in normalized form, i.e., a formthat incorporates a rotational adjustment of the refined grid elementand corresponding grid if necessary so that the a vector component isparallel to the x-axis.

The grid producer and element refiner 50 also records the locations ofthe matching points in an on-off table (e.g., for arrangement 74, table82 shown in FIG. 22) corresponding to the refined grid element (step2130). Thus, a refined version of the matching points portion of thearrangement can be created using only the refined grid element and theon-off table.

In iterations, ignoring the points already recorded in connection withany grid elements retained after previous iterations (e.g., by maskingout such points), the grid producer and element refiner 50 producesadditional retained grid elements and on-off tables for which theminimum number of matching points are found (e.g., as shown in FIGS.23-26 for additional element 84 and table 86) (step 2140). As produced,the additional retained grid elements incorporate the same rotationaladjustment (if any) that was necessary to retain the first retained gridelement in normalized form as described above.

The positions of any remaining points in the arrangement (e.g., point Nwhich was matched for neither element 78 nor element 84) are recorded,after the same rotational adjustment based on the first retained gridelement (step 2150).

Thus, the image processing system 24 detects regular patternsrepresented in the digital image 36 and indicates the patterns byproducing the grid elements and corresponding on-off tables.

The technique (i.e., the procedure described above) may be implementedin hardware or software, or a combination of both. In at least somecases, it is advantageous if the technique is implemented in computerprograms executing on programmable computers that each include aprocessor, a storage medium readable by the processor (includingvolatile and non-volatile memory and/or storage elements), at least oneinput device such as a keyboard, and at least one output device. Programcode is applied to data entered using the input device to perform theprocedure described above and to generate output information. The outputinformation is applied to one or more output devices.

In at least some cases, it is advantageous if each program isimplemented in a high level procedural or object-oriented programminglanguage such as Microsoft C or C++ to communicate with a computersystem. The programs can be implemented in assembly or machine language,if desired. In any case, the language may be a compiled or interpretedlanguage.

In at least some cases, it is advantageous if each such computer programis stored on a storage medium or device (e.g., ROM or magnetic diskette)that is readable by a general or special purpose programmable computerfor configuring and operating the computer when the storage medium ordevice is read by the computer to perform the procedures described inthis document. The system may also be considered to be implemented as acomputer-readable storage medium, configured with a computer program,where the storage medium so configured causes a computer to operate in aspecific and predefined manner.

Other embodiments are within the scope of the following claims. Forexample, the threshold determiner 40 may be based on circularity orbounding-box perimeters to expose discrete items of similar circularityor similar bounding-box perimeters. The arrangement analyzer 10 mayrefine the grid element by applying a formula that takes as inputs thepoints and the grid element's original vectors and angles. For example,the formula may specify determining for each point a difference betweenits expected and actual location, producing an average of thedifferences, and adjusting the grid element by the average. In caseswhere the arrangement includes more than one ideal pattern and eachpattern is identified with a different size of discrete objects, theimage processing system may check the size of a discrete object (e.g.,by using a normalized correlation search) before associating thecorresponding point with a particular pattern.

What is claimed is:
 1. A method for analyzing an acquired arrangement ofobject locations that imperfectly conforms to an ideal arrangement ofpoints, the method comprising:in the acquired arrangement of objectlocations, finding sets of vectors; deriving a composite set of vectorsfrom the sets of vectors; determining vectors between an object locationand a number of the object locations, nearest neighboring points;determining whether an object location matches, to an acceptabletolerance, a position specified by the composite set of vectors; andadjusting at least one of the vectors in the composite set to take intoaccount a difference between the position specified and the actualposition of the matching object location.
 2. The method of claim 1,wherein at least one of the object locations represents an electricalterminal.
 3. The method of claim 2, further comprising:deriving anapproximation of the ideal arrangement of points from the acquiredarrangement of object locations, wherein the approximation includes anindication of whether an intersection specified by the composite set ofvectors corresponds to an object location.
 4. The method of claim 1,further comprising:based on the adjusted composite set of vectors andthe actual position of the matching object location, specifying alocation in which to search for another matching object location.
 5. Themethod of claim 1, further comprising:determining whether a non-matchingobject location matches, to an acceptable tolerance, another positionspecified by another composite set of the vectors.
 6. Computer software,residing on a computer-readable storage medium, comprising instructionsfor use in a computer system to analyze an acquired arrangement ofobject locations that imperfectly conforms to an ideal arrangement ofpoints, the instructions causing the system to:in the acquiredarrangement of objects locations, find sets of vectors; derive acomposite set of vectors from the sets of vectors; determine vectorsbetween an object location and a number of the object location's nearestneighboring points; determine whether an object location matches, to anacceptable tolerance, a position specified by the composite set ofvectors; and adjust at least one of the vectors in the composite set totake into account a difference between the position specified and theactual position of the matching object location.
 7. The computersoftware of claim 6, wherein at least one of the object locationsrepresents an electrical terminal.
 8. The computer software of claim 7,further comprising instructions for causing the system to:derive anapproximation of the ideal arrangement of points from the acquiredarrangement of object locations, wherein the approximation includes anindication of whether an intersection specified by the composite set ofvectors corresponds to an object location.
 9. A method for analyzing anacquired arrangement of object locations, at least one of the objectlocations representing an electrical terminal, the arrangementimperfectly conforming to an ideal arrangement of points, the methodcomprising:in the acquired arrangement of object locations, finding setsof vectors by determining vectors between each object location and anumber of the object location's nearest neighboring points; deriving acomposite set of vectors from the sets of vectors; determining whetheran object location matches, to an acceptable tolerance, a positionspecified by the composite set of vectors; adjusting at least one of thevectors in the composite set to take into account a difference betweenthe position specified and the actual position of the matching objectlocation; and deriving an approximation of the ideal arrangement ofpoints from the acquired arrangement of object locations, wherein theapproximation includes an indication of whether an intersectionspecified by the composite set of vectors corresponds to an objectlocation.
 10. A system for detecting a pattern of discrete objectsrepresented in an image, the system comprising:a location producerderiving an arrangement of object locations from the image, each objectlocation representing an electrical terminal; a vectors producerderiving a set of vectors represented in the arrangement; a grid elementproducer deriving a two-vector grid element from the set of vectors; anda grid producer and grid element refiner testing the two-vector gridelement against the arrangement of object locations and refining thetwo-vector grid element to take into account the actual positions of theobject locations.
 11. Computer software, residing on a computer-readablestorage medium, comprising instructions for use in a computer system toanalyze an acquired arrangement of object locations, at least one of theobject locations representing an electrical terminal, the arrangementimperfectly conforming to an ideal arrangement of points, theinstructions causing the system to:in the acquired arrangement of objectlocations, find sets of vectors by determining vectors between eachobject location and a number of the object location's nearestneighboring points; derive a composite set of vectors from the sets ofvectors; determine whether an object location matches, to an acceptabletolerance, a position specified by the composite set of vectors; adjustat least one of the vectors in the composite set to take into account adifference between the position specified and the actual position of thematching object location; and derive an approximation of the idealarrangement of points from the acquired arrangement of object locations,wherein the approximation includes an indication of whether anintersection specified by the composite set of vectors corresponds to anobject location.
 12. A method for analyzing a given arrangement ofobjects, within a two-dimensional digital representation of a devicecomprising the objects, by comparing the given arrangement to an idealarrangement, the method comprising:representing relationships among theobjects in the two-dimensional representation with vectors connectingthe objects to each other, each of the vectors comprising directioninformation and distance information; obtaining a given subset of thevectors, the given subset representing a given object in relation togiven neighboring objects near the given object; obtaining acorresponding given ideal subset of vectors from the ideal arrangementand comparing the given subset to the given ideal subset to determinewhether the given subset matches the given ideal subset to within anacceptable tolerance; and creating modified position informationregarding the given object in accordance with a relation between alocation of a corresponding object in the ideal arrangement and thegiven object.
 13. The method according to claim 12, furthercomprising:producing an arrangement of points, each of the pointsrepresenting a location of a corresponding one of the objects; anddetermining a best matching point among the arrangement of points.